package com.aponisipsis.gl3d.geometry;

public class FaceGroup {
	int materialIndex;
	String uvMap;
	Face[] faces;
	
	public FaceGroup(int materialIndex, String uvMap, Face[] faces){
		this.materialIndex = materialIndex;
		this.uvMap = uvMap;
		this.faces = faces;
	}
	
	@Override
	public boolean equals(Object  fg){
		if(fg instanceof FaceGroup){
			FaceGroup o = (FaceGroup)fg;
			return o.materialIndex==materialIndex && o.uvMap.equals(uvMap);
		}else{
			return false;
		}
	}
	
	@Override
	public int hashCode(){
		return (materialIndex+uvMap).hashCode();
	}
}
